<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>echarts</title>

</head>

<body>
    <div id="container"></div>
    <div id="info">打开 console 查看：</div>
    <script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.js"></script>
	<script type="text/javascript">

        console.log('post start ');
        response_info = 'kkkk';
        var ip = $(this).parent().prev().prev().prev().prev().text();
        data_tmp = {'ip':ip, 'text':"success for ajax"};
        $.ajax({
            type:"POST",
            url:"/test_post",
            dataType:"json",
            data: data_tmp,
            success:function(data){
                console.log('call back start:'+response_info)
                console.log(data)
                console.log(data['name'])
                response_info = data['name']
                console.log('after set:'+response_info)
            },
            error: function (e) {
                console.log("error:"+e.text)
            }
        });


        console.log('init done response:' + response_info);
        console.log('end');

	</script>

</body>

</html>